package com.rosense.srpingboot.entity;

/**
 * 
 * @author 李岩飞
 * @email eliyanfei@126.com
 * @date 2018年3月10日 下午6:12:12
 */
public class Result {
	private boolean status;
	private Object data;

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public Result() {
	}

	public Result(Object data) {
		this.data = data;
	}

	public Result(boolean status, Object data) {
		this.status = status;
		this.data = data;
	}

	public static Result ok() {
		return new Result(true,null);
	}

	public static Result ok(Object data) {
		return new Result(true,data);
	}

	public static Result error() {
		return new Result(false, null);
	}

	public static Result error(Object data) {
		return new Result(false, data);
	}

}
